package com.yuke.cloud.service.smc.service.impl;

import com.yuke.cloud.service.smc.dao.ShopStockGoodsMapper;
import com.yuke.cloud.service.smc.entity.ShopStockGoods;
import com.yuke.cloud.service.smc.service.ShopStockGoodsService;
import com.yuke.cloud.common.core.support.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


/**
 * Created by wg on 2018/09/11.
 */
@Service
@Transactional
public class ShopStockGoodsServiceImpl extends BaseService<ShopStockGoods> implements ShopStockGoodsService {
    @Resource
    private ShopStockGoodsMapper shopStockGoodsMapper;

    @Override
    public void updateGoodsStatus(Long id,Byte status){
        shopStockGoodsMapper.updateGoodsStatus(id,status);
    }

    @Override
    public int save(ShopStockGoods record) {
        record.setStockGoodsId(generateId());
        return super.save(record);
    }
}
